package com.wiscamp.ninechapters.problems.domain.models.problems.questions;

import com.wiscamp.ninechapters.problems.domain.models.problems.answers.Answer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 比与比例问题
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RatioProportionQuestion extends Question {
    /**
     * 问题答案
     */
    private Answer answer;


    @Override
    public void setCurrentAnswer(Answer answer) {
        this.answer = answer;
    }

    @Override
    public Answer getCurrentAnswer() {
        return this.answer;
    }

    @Override
    public Collection<Answer> getCurrentAnswers() {
        var answers = new ArrayList<Answer>();
        answers.add(this.answer);
        return answers;
    }
}
